In a data center network using a layer 2 leaf-spine topology architecture, to improve reliability and service quality of the data center network, multiple physical links are usually configured between a switch and a server. To enable service traffic to be simultaneously transmitted on the multiple physical links, the multiple physical links are usually aggregated into one logical link. The logical link may be referred to as a link aggregation group (LAG).
To prevent a packet from being discarded due to congestion on some physical links in the data center network, the service traffic usually needs to be evenly allocated to each physical link in the LAG. As shown in FIG. 1, it is assumed that a server 1 needs to send a packet to a server 5 using a leaf node 2, a backbone node 3, and a leaf node 4. After the leaf node 2 receives the packet sent by the server 1, if the leaf node 2 finds, in a flow table stored in the leaf node 2, an entry (including an identifier of the service flow, an outbound, and a timestamp at which a first packet of the service flow arrives at the leaf node 2) corresponding to the service flow to which the packet belongs, the leaf node 2 sends the packet using the outbound interface in the entry. If the leaf node 2 has not found the entry in the flow table, the leaf node 2 may select an optimal physical link (for example, a physical link having lowest bandwidth utilization and a lowest queue occupation rate) for the packet according to bandwidth utilization and a queue length of a physical link supported by the leaf node 2, send the packet using an outbound interface of the physical link, and add, to the foregoing flow table, the entry corresponding to the service flow to which the packet belongs.
However, in the foregoing service traffic allocation method, the leaf node 2 can select, only according to the bandwidth utilization and the queue length of the physical link of the leaf node 2, an optimal physical link for the packet that needs to be forwarded. That is, the leaf node 2 can ensure that only service traffic on physical links of the leaf node 2 is balanced, and the packet further needs to be sent to the leaf node 4 through the backbone node 3. Therefore, when a physical link between the backbone node 3 and the leaf node 4 is congested, the packet may be lost on the physical link between the backbone node 3 and the leaf node 4.